/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.gxuwz.byssxsys.model;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.gxuwz.byssxsys.model.*;
import com.gxuwz.byssxsys.dao.*;
import com.gxuwz.byssxsys.service.*;
import com.gxuwz.byssxsys.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


@Entity
@Table(name = "system_info")
public class SystemInfo extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SystemInfo";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_SIXIBU1 = "系部";
	public static final String ALIAS_SICLASSESS2 = "班级";
	public static final String ALIAS_SISTART_DATE3 = "开始时间";
	public static final String ALIAS_SIEND_DATE4 = "结束时间";
	public static final String ALIAS_SISET_PERSON5 = "设置人";
	public static final String ALIAS_SIREMARK6 = "备注";
	
	//date formats
	public static final String FORMAT_SISTART_DATE3 = DATE_FORMAT;
	public static final String FORMAT_SIEND_DATE4 = DATE_FORMAT;
	

	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * id       db_column: id 
     */ 	
	
	private java.lang.Integer id;
    /**
     * 系部       db_column: s_i_xibu1 
     */ 	
	@Length(max=60)
	private java.lang.String sixibu1;
    /**
     * 班级       db_column: s_i_classess2 
     */ 	
	@Length(max=60)
	private java.lang.String siclassess2;
    /**
     * 开始时间       db_column: s_i_start_date3 
     */ 	
	
	private java.util.Date sistartDate3;
    /**
     * 结束时间       db_column: s_i_end_date4 
     */ 	
	
	private java.util.Date siendDate4;
    /**
     * 设置人       db_column: s_i_set_person5 
     */ 	
	@Length(max=60)
	private java.lang.String sisetPerson5;
    /**
     * 备注       db_column: s_i_remark6 
     */ 	
	@Length(max=500)
	private java.lang.String siremark6;
	//columns END


	public SystemInfo(){
	}

	public SystemInfo(
		java.lang.Integer id
	){
		this.id = id;
	}

	

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	@Id @GeneratedValue(generator="custom-id")
	@GenericGenerator(name="custom-id", strategy = "increment")
	@Column(name = "id", unique = true, nullable = false, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getId() {
		return this.id;
	}
	
	@Column(name = "s_i_xibu1", unique = false, nullable = true, insertable = true, updatable = true, length = 60)
	public java.lang.String getSixibu1() {
		return this.sixibu1;
	}
	
	public void setSixibu1(java.lang.String value) {
		this.sixibu1 = value;
	}
	
	@Column(name = "s_i_classess2", unique = false, nullable = true, insertable = true, updatable = true, length = 60)
	public java.lang.String getSiclassess2() {
		return this.siclassess2;
	}
	
	public void setSiclassess2(java.lang.String value) {
		this.siclassess2 = value;
	}
	
	@Transient
	public String getSistartDate3String() {
		return DateConvertUtils.format(getSistartDate3(), FORMAT_SISTART_DATE3);
	}
	public void setSistartDate3String(String value) {
		setSistartDate3(DateConvertUtils.parse(value, FORMAT_SISTART_DATE3,java.util.Date.class));
	}
	
	@Column(name = "s_i_start_date3", unique = false, nullable = true, insertable = true, updatable = true, length = 0)
	public java.util.Date getSistartDate3() {
		return this.sistartDate3;
	}
	
	public void setSistartDate3(java.util.Date value) {
		this.sistartDate3 = value;
	}
	
	@Transient
	public String getSiendDate4String() {
		return DateConvertUtils.format(getSiendDate4(), FORMAT_SIEND_DATE4);
	}
	public void setSiendDate4String(String value) {
		setSiendDate4(DateConvertUtils.parse(value, FORMAT_SIEND_DATE4,java.util.Date.class));
	}
	
	@Column(name = "s_i_end_date4", unique = false, nullable = true, insertable = true, updatable = true, length = 0)
	public java.util.Date getSiendDate4() {
		return this.siendDate4;
	}
	
	public void setSiendDate4(java.util.Date value) {
		this.siendDate4 = value;
	}
	
	@Column(name = "s_i_set_person5", unique = false, nullable = true, insertable = true, updatable = true, length = 60)
	public java.lang.String getSisetPerson5() {
		return this.sisetPerson5;
	}
	
	public void setSisetPerson5(java.lang.String value) {
		this.sisetPerson5 = value;
	}
	
	@Column(name = "s_i_remark6", unique = false, nullable = true, insertable = true, updatable = true, length = 500)
	public java.lang.String getSiremark6() {
		return this.siremark6;
	}
	
	public void setSiremark6(java.lang.String value) {
		this.siremark6 = value;
	}
	

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Sixibu1",getSixibu1())
			.append("Siclassess2",getSiclassess2())
			.append("SistartDate3",getSistartDate3())
			.append("SiendDate4",getSiendDate4())
			.append("SisetPerson5",getSisetPerson5())
			.append("Siremark6",getSiremark6())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SystemInfo == false) return false;
		if(this == obj) return true;
		SystemInfo other = (SystemInfo)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

